package com.shh.shojbackendserviceclient.service;


import com.shh.shojbackendmodel.model.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 判题服务 定义了去哪找这个服务，并且这个服务的路径 openFeign是提供给内部服务之间调用 会自动拼接path
 */
@FeignClient(name = "shoj-backend-judge-service",path = "/api/judge/inner")
public interface JudgeFeignClient {

    /**
     * 判题
     * @param questionSubmitId
     * @return
     */
    @PostMapping("/do")
    QuestionSubmit doJudge(@RequestParam("questionSubmitId") long questionSubmitId);
}
